import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login'
import Common from '@/components/Common'
import Table from '@/components/Table'
import Basics from '@/components/basics/Edit'
import BigDate from '@/components/bigDate/Edit'
import Random from '@/components/random/Edit'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/aialrs',
      name: 'Common',
      component: Common,
      children: [
        {
          path: '/basics',
          component: Basics
        },
        {
          path: '/bigdate',
          component: BigDate
        },
        {
          path: '/random',
          component: Random
        },
        {
          path: '/ad:sidenav',
          component: Table
        },
        {
          path: '*',
          component: Table
          // redirect: '/aialrs'
        }
      ]
    },
    {
      path: '*',
      redirect: '/'
    }
  ],
  mode: 'history'
})
